﻿using System;
using System.Data.SqlClient;
using Devv.Core.UniDataTier;

namespace Yglu.BusinessLayer.Reports
{
	public class ProductOrders : BaseReport
	{
		#region Properties

		public String ProductTitle { get; set; }
		public Int32 OrderCount { get; set; }
		public String TopSellerName { get; set; }
		public String MostSoldInStoreTitle { get; set; }

		#endregion

		#region Constructor

		public ProductOrders()
		{
		}

		public ProductOrders(SqlDataReader reader)
		{
			Construct(reader);
		}

		#endregion

		#region Methods

		public override void Load(SqlDataReader reader)
		{
			DateGenerated = DateTime.Now;

			ProductTitle = DataHandler.GetString(reader, "ProductTitle");
			OrderCount = DataHandler.GetInt32(reader, "OrderCount");
			MostSoldInStoreTitle = DataHandler.GetString(reader, "MostSoldInStoreTitle");
		}

		#endregion
	}
}